package com.team5.stockservice.service.impl;

import com.team5.stockservice.entity.Inport;
import com.team5.stockservice.mapper.InportMapper;
import com.team5.stockservice.service.InportService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Date;
import java.util.List;

@Service
public class InportServiceImpl implements InportService {
    @Autowired
    private InportMapper inportMapper;

    @Override
    public void insert(String paytype, Date inporttime, String operateperson, Integer number, String remark, Double inportprice, Integer providerid, Integer goodsid) {
        inportMapper.insert(paytype, inporttime, operateperson, number, remark, inportprice, providerid, goodsid);
    }

    @Override
    public void update(Integer id, String paytype, Date inporttime, Integer number, String remark, Double inportprice, Integer providerid, Integer goodsid, String operateperson) {
        inportMapper.update(id, paytype, inporttime, number, remark, inportprice, providerid, goodsid, operateperson);
    }

    @Override
    public void delete(Integer id) {
        inportMapper.delete(id);
    }

    @Override
    public List<Inport> select(Integer providerid, Integer goodsid, Integer index, Integer limit) {

        return inportMapper.select(providerid, goodsid, index, limit);
    }

    @Override
    public Inport selectById(Integer id) {
        return inportMapper.selectById(id);
    }
}
